import { DEFAULT_LAYOUT } from '../base';
import { AppRouteRecordRaw } from '../types';

const LIST: AppRouteRecordRaw = {
  path: '/order',
  name: 'order',
  component: DEFAULT_LAYOUT,
  meta: {
    locale: 'menu.order',
    requiresAuth: true,
    icon: 'icon-book',
    order: 4,
  },
  children: [

    {
      path: 'order-order', // The midline path complies with SEO specifications
      name: 'Order',
      component: () => import('@/views/order/order/index.vue'),
      meta: {
        locale: 'menu.order.order.list',
        requiresAuth: true,
        roles: ['*'],
      },
    },
    {
      path: 'order-orderInvoice',
      name: 'OrderInvoice',
      component: () => import('@/views/order/orderInvoice/index.vue'),
      meta: {
        locale: 'menu.order.orderInvoice.list',
        requiresAuth: true,
        roles: ['*'],
      },
    },
    {
      path: 'order-orderReturnApply',
      name: 'OrderReturnApply',
      component: () => import('@/views/order/orderReturnApply/index.vue'),
      meta: {
        locale: 'menu.order.orderReturnApply.list',
        requiresAuth: true,
        roles: ['*'],
      },
    },
    {
        path: 'order-payInfo',
        name: 'PayInfo',
        component: () => import('@/views/order/payInfo/index.vue'),
        meta: {
          locale: 'menu.order.payInfo.list',
          requiresAuth: true,
          roles: ['*'],
        },
      }
  ],
};

export default LIST;
